1. Field of Invention
The present invention relates to a barcode recognition method and a barcode recognition apparatus, and more particularly to a method of improving multi-type barcode recognition efficiency using continuous sampling, a computer readable medium, and a barcode recognition apparatus.
2. Related Art
A linear barcode contains black and white bar blocks arranged at intervals. On the basis of barcode protocol, a width of each bar block and an arrangement of black and white combination of bar blocks represent different numbers and letters. The number and letter combination represented by the aforementioned width and black and white combination of bar blocks are different according to the code protocols.
Currently, there are two common methods for recognizing the barcode pattern. In the first method, the entire barcode pattern is captured, and complex numerical operation is performed on the entire pattern through complex image processing method to discover the barcode pattern area in the captured image. For example, R.O.C. (Taiwan) Invention Patent No. 1309390, entitled “BARCODE RECOGNITION SYSTEM AND BARCODE RECOGNITION METHOD USING DIGITAL CAMERA” provides a barcode recognition system using a digital camera, which at least includes a digital camera, a barcode pattern database, an image recognition device, and a decoder. The digital camera captures and stores image data of the barcodes. The barcode pattern database stores a plurality of pre-determined barcode feature data. The image recognition device recognizes and modifies the barcode pattern by the barcode feature data. The decoder performs the decoding operation on the barcode pattern according to the barcode feature data.
However, the method of processing the entire barcode pattern needs additional hardware resources. Using a handheld operation device with relatively low hardware performance, this method requires considerable operation time. Meanwhile, the sampling quality of the image shot by a camera lens is often affected by external factors such as image blur caused by lens vibration, incomplete sampling caused by lens shifting, and image skew caused by the improper sampling angle between the lens and the barcode, and the poor image quality may cause a comparison failure for the binary sequence generated after binarization and may even cause misjudgment.
However, the method of processing the entire barcode pattern consumes lots of hardware resources. To a handheld data processing device with relatively low hardware performance, this method requires considerable operation time. Meanwhile, the sampling quality of the image captured by the camera is often affected by external factors, such as image blur caused by lens vibration, incomplete sampling caused by lens shifting, and image skew caused by the improper sampling angle between the lens and the barcode pattern. The poor image quality may cause a comparison failure for the binary sequence generated after binarization and may even cause misjudgment.
The second method is mainly directed to a linear barcode. A scan line is taken from the barcode pattern through all the bar blocks of the barcode pattern, the image is processed and binarization process is performed only on the scan line, and the barcode is decoded after a binary array is generated. In this method, only one scan line is processed, therefore the barcode recognition efficiency is optimized. However, one single scan line may contain a portion that cannot be binarized due to poor sampling quality, so the decoding result of the barcode cannot pass checksum verification. Particularly for a long barcode, for example, a barcode containing multiple sections, there is an increased probability that the recognition result cannot pass the checksum verification due to recognition errors of a single barcode data character. As long as a recognition error occurs with regard to any barcode data character or a certain bar cannot be imaged clearly, the recognition result cannot pass checksum verification, so this scanning result is directly abandoned and next scanning and recognizing has to be performed. If the barcode pattern has an undesirable quality, the scanning and recognizing are repeated additional times, requiring considerable additional scanning time.
In addition to these problems, a barcode protocol (or referred to as a barcode type), of a barcode pattern to be read is usually unable to be determined. Therefore, when the barcode pattern is being read, the barcode reader device usually must read the barcode pattern repeatedly according to different barcode protocols until a certain barcode protocol is applicable for reading the barcode pattern. Alternatively, when the barcode pattern cannot be read after several continuous reading cycles, it is determined that the barcode pattern is unreadable.
In addition to these problems, a barcode protocol (or referred to as a barcode type) of a barcode pattern to be read is usually unable to be determined by a user. Therefore, when the barcode pattern is being recognized, the barcode recognition apparatus usually must recognizes the barcode pattern repeatedly according to different barcode protocols until a certain barcode protocol is applicable for recognizing the barcode pattern. Alternatively, when the barcode pattern cannot be recognized after several continuous recognition cycles, it is determined that the barcode pattern is unreadable.
Where barcode patterns of multiple barcode types are used, the barcode recognition apparatus repeatedly recognizes the barcode pattern according to different barcode protocols. In both the first and second barcode recognition method referred to previously, considerable hardware resources are consumed. Furthermore, the barcode recognition apparatus is usually a handheld data processing device relatively lacking in hardware resources, so if the reading of multiple barcode types is supported at the same time and the barcode types can be automatically determined, the recognition rate of the barcode recognition apparatus is low. Therefore, for the handheld data processing device serving as the barcode recognition apparatus, the number of supported barcode types must be reduced, or the function of the determining the barcode types automatically must be abandoned, so the user sets the barcode protocol used in each scanning and recognition.